﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ErrorReport.aspx.cs" Inherits="MouseExtender.WebSite.ErrorReport" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table>
            <tr>
                <td>
                    Date From:
                </td>
                <td>
                    <asp:Calendar ID="dtpDateFrom" runat="server" />
                </td>
            </tr>
            <tr>
                <td>
                    Date To:
                </td>
                <td>
                    <asp:Calendar ID="dtpDateTo" runat="server" />
                </td>
            </tr>
            <tr>
                <td>
                    Include Non Critical Errors:
                </td>
                <td>
                    <asp:CheckBox ID="cbIncludeNonCritical" runat="server" Checked="true" />
                </td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: right">
                    <asp:Button ID="btnGenerate" runat="server" Text="Generate Report" OnClick="btnGenerate_Click" />
                </td>
            </tr>
        </table>
        <asp:GridView ID="gvErrorReport" runat="server" DataSourceID="odsErrorReport" EnableModelValidation="True"
            AutoGenerateColumns="False">
            <Columns>
                <asp:BoundField DataField="ErrorMessage" HeaderText="ErrorMessage" SortExpression="ErrorMessage" />
                <asp:BoundField DataField="Quantity" HeaderText="Quantity" SortExpression="Quantity" />
                <asp:BoundField DataField="MaxVersion" HeaderText="MaxVersion" SortExpression="MaxVersion" />
                <asp:BoundField DataField="LastErrorTime" HeaderText="LastErrorTime" SortExpression="LastErrorTime" />
                <asp:CheckBoxField DataField="IsCritical" HeaderText="IsCritical" SortExpression="IsCritical" />
            </Columns>
        </asp:GridView>
        <asp:ObjectDataSource ID="odsErrorReport" runat="server" SelectMethod="GenerateReport"
            TypeName="MouseExtender.WebSite.Logic.Managers.ErrorReportsManager">
            <SelectParameters>
                <asp:ControlParameter ControlID="dtpDateFrom" DefaultValue="" Name="dateFrom" PropertyName="SelectedDate"
                    Type="DateTime" />
                <asp:ControlParameter ControlID="dtpDateTo" Name="dateTo" PropertyName="SelectedDate"
                    Type="DateTime" />
                <asp:ControlParameter ControlID="cbIncludeNonCritical" Name="includeNonCritical"
                    PropertyName="Checked" Type="Boolean" />
            </SelectParameters>
        </asp:ObjectDataSource>
    </div>
    </form>
</body>
</html>
